<template>
<div>
  <h2>我是哥哥组件，我开的车是{{car}}</h2>
  <button @click="getCar">找了个富婆，给换了个车</button>
  <button @click="changeVal(2)">修改父组件中的count</button>
  <button @click="off">解绑</button>
</div>
</template>

<script>
export default {
  name: "Brother",
  data(){
    return{
      car:'八手蒙迪欧'
    }
  },
  methods:{
    getCar(){
      this.car = '布加迪Plus'
    },
    changeVal(val){
      this.$emit('changeValue',val)
    },
    off(){
      // this.$off('changeValue')
      this.$off(['changeValue'])
    }
  },
}
</script>

<style scoped>

</style>